import { Component, OnInit } from '@angular/core';
import { NavController, ModalController, ActionSheetController } from '@ionic/angular';
import { DataService } from '@services/data.service';
// import { PunchModal } from '@modals/personal-manager/punch-modal';
import { AskLeavePage } from '../ask-leave/ask-leave';

@Component({
    selector: 'popover',
    templateUrl: 'popover.html',
    styleUrls: ['popover.scss']
})

export class PopoverPage implements OnInit {
    user;
    title;
    person;
    punchStatus;
    selectTabIndex;
    constructor(public navCtrl: NavController,
        public modalCtrl: ModalController,
        public actionSheetCtrl: ActionSheetController,
        public dataService: DataService,
    ) {
    }

    ngOnInit() {

        // 默认为个人页
        this.selectTabIndex = 0;

        // 先假定是管理层
        const punchStatusList = ['未在岗', '公司', '外出'];
        this.punchStatus = punchStatusList[0];
    }

    ionViewWillEnter() {
    }

    // pressButton (index) {
    //     this.viewCtrl.dismiss();
    //       if (index === 0) {   // 打卡
    //         const modal = this.modalCtrl.create(PunchModal); // 创建新的页面——UserInfoModalPage
    //         modal.present(); // 页面展示
    //       } else if (index === 1) { // 离岗
    //         // 已删除此功能
    //       } else if (index === 2) { // 请假
    //         this.navCtrl.push(AskLeavePage);
    //       }
    //   }
    pressButton(index){}
}
